import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class ThemePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.center,
        children: [

    Theme( data: ThemeData(iconTheme: IconThemeData(color: Colors.red)), child: Icon(Icons.favorite)),
    Theme( data: Theme.of(context).copyWith(iconTheme: IconThemeData(color: Colors.green)),
    child: Icon(Icons.feedback)),
    Container( color: Theme.of(context).primaryColor,//容器背景色复用应用主题色
    child: Text( 'Text with a background color', style: Theme.of(context).textTheme.title,//Text组件文本样式复用应用文本样式
    ))

    ]);
  }
}